package cn.gson.crm.model.entity;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.Data;

/**
 * 学生分配表
 * @author Jkelove
 *
 */
@Entity
@Table(name="tb_student_class_shadow")
@Data
public class StudnetClassShadow {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="tb_shadow_id")
	private Long id;
	
	/**
	 * 名称id
	 */
	@Column(name="shadow_id")
	private Long shadowId;
	
	/**
	 * 姓名
	 */
	@Column(name="shadow_name")
	private String shadowName;
	
	/**
	 * 班级人数
	 */
	@Column(name="shadow_num")
	private Integer shadowNum;
	
	/**
	 * 班主任
	 */
	@Column(name="shadow_class_teacher")
	private String shadowClassTeacher;
	
	/**
	 * 教员
	 */
	@Column(name="shadow_teacher")
	private String shadowTeacher;
	
	/**
	 * 部门经理
	 */
	@Column(name="shadow_monitor")
	private String monitor;
	
	/**
	 * 班级类型
	 */
	@Column(name="class_type")
	private String classType;
	
	/**
	 * 班级状态
	 */
	@Column(name="class_state")
	private String states;
	
	@JsonIgnore
	@ManyToOne
	@JoinColumn(name = "parent_id")
	private StudnetClassShadow parent;
	
	@OneToMany(mappedBy = "parent", fetch = FetchType.EAGER)
	private List<StudnetClassShadow> children;
	
	@Column(name="open_shadow_time")
	private String openShadowTime;
	
	/**
	 * 是否删除
	 */
	@Column(name="is_delete")
	private Boolean delete;
}
